<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class Ngos extends Public_Controller
{
	function __construct()
	{
		parent::__construct();
		
		// load the matching language
		$this->lang->load('pages_ngos', $this->imageene->is_language_available($this->session->userdata('uilang')));
		
		$this->load->helper('image');
	}

	function index()
	{
		
		$countries = Country::get_array();
		$zones = Zone::get_array();
		$causes = Cause::get_array();

		$ngos = new Ngo();
		$ngos->get();
		
		foreach($ngos as $n) {
			$n->country = $n->get_ngo_country();
			
		}
		
		$params = array(
			"ngos" => $ngos,
			"countries" => $countries,
			"areas" => $zones,
			"causes" => $causes,
		);
		
		$this->imageene->page('ngos', $params);
	}	
}

/* End of file pages.php */
/* Location: ./application/controllers/pages.php */